Passed
Pull Request — master (#134)
by
unknown
02:20
created

AuthResponse   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 22
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 11

11 Functions

Rating   Name   Duplication   Size   Complexity  
A get_intuit_tid 0 1 1
A isJson 0 1 1
A getToken 0 1 1
A headers 0 1 1
A isContentType 0 1 1
A valid 0 1 1
A processResponse 0 1 1
A text 0 1 1
A getJson 0 1 1
A status 0 1 1
A getContentType 0 1 1
1
import * as popsicle from "popsicle";
2
import { Token } from "../access-token/Token";
3
4
export class AuthResponse {
5
  response: popsicle.Response;
6
  body: string;
7
  json: Record<string, any>;
8
  intuit_tid: string;
9
  token: Token;
10
  constructor(params: {
11
    token?: Token,
12
    response?: popsicle.Response,
13
    body?: string,
14
    intuit_id?: string
15
  });
16
  processResponse(response: popsicle.Response): void;
17
  getToken(): Token;
18
  text(): string;
19
  status(): number;
20
  headers(): Record<string, any>;
21
  valid(): boolean;
22
  getJson(): Record<string, any>;
23
  get_intuit_tid(): string;
24
  isContentType(): boolean;
25
  getContentType(): string;
26
  isJson(): boolean;
27
}
28